#include <cstdio>
#include <algorithm>
using namespace std;

struct node {
	bool use;
	int l, r;
};

node l[1005];
bool flag[150005];
int n, maxx = 150005;


bool cmp(node x, node y) {
	return x.l < y.l;
}

void calc(int i) {
	for (int p = l[i].l; p <= l[i].r; ++p) {
		if (flag[p]) return;
	}
	flag[l[i].r] = 1;
}

int main() {
	int x, r;
	scanf("%d", &n);
	for(int i = 1; i <= n; ++i) {
		scanf("%d %d", &x, &r);
		l[i].use = 1;
		l[i].l = max(x - r, 0);
		l[i].r = x + r;
		maxx = max(maxx, l[i].r);
	}

	sort(l + 1, l + n + 1, cmp);

	for (int i = 1; i <= n; ++i) {
		for (int j = i + 1; j <= n; ++j) {
			if (l[j].l >= l[i].r) break;
			if (l[j].r <= l[i].r) {
				l[i].use = 0;
			}
		}
	}

	for (int i = 1; i <= n; ++i) {
		if (!l[i].use) continue;
		calc(i);
	}

	int ans = 0; 
	for (int i = 1; i <= maxx; ++i) {
		if (flag[i]) ++ans;
	}
	printf("%d\n", ans);
	return 0;
}